import { createRouter, createWebHistory } from 'vue-router'  

const router = createRouter({  
  history: createWebHistory(import.meta.env.BASE_URL),  
  routes: [  
    {  
      path: '/',  
      redirect: '/menu/findmusic' // 重定向到新的路径  
    },  
    {  
      path: '/menu',  
      name: 'menu',  
      component: () => import('../views/menu/Mainmenu.vue'),  
      children: [  
        {  
          path: 'findmusic', // 这里没有前导斜杠  
          name: 'findmusic',  
          component: () => import('../views/findmusic/index.vue')  
        } ,
        {
          path: 'mymusic', // 这里没有前导斜杠
          name: 'mymusic',
          component: () => import('../views/mymusic/index.vue')
        } 
      ]  
    }  
  ]  
});  

export default router;  